home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Essentials / Developer Essentials Nov 90 / Apple II / Apple.II.partition / Tools / Technical.Notes / IIGS / TN.IIGS.082 < prev    next >
Encoding:
Text File  |  1990-05-25  |  1.4 KB  |  37 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. Apple IIgs
  7. #82:    Controlling the Control Manager
  8.  
  9. Written by:    Dave Lyons                                            May 1990
  10.  
  11. This Technical Note describes an anomaly in the NewControl2 call in System 
  12. Software 5.0.2 and provides a solution.
  13. _____________________________________________________________________________
  14.  
  15. When NewControl2 creates a control, it's supposed to set the QuickDraw II port 
  16. to the control's owner port--but it doesn't.  If the port is not already set 
  17. properly, this can cause the system to trash memory at random.
  18.  
  19. To avoid the problem, always SetPort to the window in which you are creating 
  20. controls before calling NewControl2.
  21.  
  22. Implications for NewWindow2
  23.  
  24. NewWindow2 can create a window and its controls in one step.  In this case, 
  25. the port is not set to the window that was just created, before NewWindow2 
  26. calls NewControl2 internally.  The result is that NewWindow2 cannot reliably 
  27. create a window with an attached control list.
  28.  
  29. A solution is to do a NewWindow2 call without an attached control list, 
  30. SetPort to the newly-created window, and then do a NewControl2 call.
  31.  
  32.  
  33. Further Reference
  34. _____________________________________________________________________________
  35.   o  Apple IIgs Toolbox Reference, Volume 3
  36.  
  37.